import request from "@/utils/request";

// 查询板块列表
export function listPlate(query) {
  return request({
    url: "/bbsAdmin/plate/list",
    method: "get",
    params: query,
  });
}

// 查询板块列表
export function listPlateCate(query) {
  return request({
    url: "/bbsAdmin/plate/listPlateCate",
    method: "get",
    params: query,
  });
}

// 查询板块列表
export function listPlateTree(query) {
  return request({
    url: "/bbsAdmin/plate/listPlateTree",
    method: "get",
    params: query,
  });
}

// 查询板块详细
export function getPlate(plateid) {
  return request({
    url: "/bbsAdmin/plate/" + plateid,
    method: "get",
  });
}

// 新增板块
export function addPlate(data) {
  return request({
    url: "/bbsAdmin/plate",
    method: "post",
    data: data,
  });
}

// 修改板块
export function updatePlate(data) {
  return request({
    url: "/bbsAdmin/plate",
    method: "put",
    data: data,
  });
}

// 删除板块
export function delPlate(plateid) {
  return request({
    url: "/bbsAdmin/plate/" + plateid,
    method: "delete",
  });
}
